package top.lyc829.zzl_android.ui.team;

import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.module.LoadMoreModule;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import org.jetbrains.annotations.NotNull;

import top.lyc829.zzl_android.MyApp;
import top.lyc829.zzl_android.R;
import top.lyc829.zzl_android.logic.bean.TeamSimpleBean;

public class TeamRecyclerAdapter extends BaseQuickAdapter<TeamSimpleBean, BaseViewHolder> implements LoadMoreModule {


    public TeamRecyclerAdapter() {
        super(R.layout.travels_item);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, TeamSimpleBean teamSimpleBean) {
        baseViewHolder.setText(R.id.travels_item_title, teamSimpleBean.getTitle());
        baseViewHolder.setText(R.id.travels_item_describe, teamSimpleBean.getDescribe());
        Glide.with(MyApp.getContext())
                .load(teamSimpleBean.getImgUrl())
                .into((ImageView) baseViewHolder.getView(R.id.travels_item_img));
    }
}
